import request from '/@/utils/request';

//分页
export function buildingList(query?: Object) {
    return request({
        url: '/building/building/page',
        method: 'get',
        params: query,
    });
}

//回显
export function getBuilding(buildingId?: Number) {
    return request({
        url: '/building/building/getBuilding',
        method: 'get',
        params: { buildingId }
    });
}
//添加
export function addBuilding(data: any) {
    return request({
        url: '/building/building/addBuilding',
        method: 'post',
        data: data,
    });
}
//删除
export function deleteBuilding(ids: Number[]) {
    return request({
        url: '/building/building/deleteBuilding',
        method: 'delete',
        params: { ids },
    });
}
//更新
export function updateBuilding(data: any) {
    return request({
        url: '/building/building/updateBuilding',
        method: 'put',
        data: data,
    });
}